// 路径别名
require('module-alias/register')

const Koa = require('koa')
const parser = require('koa-bodyparser')
const path  = require('path')
const InitMangaer = require('./core/init')
const catchError = require('./middlewares/exception')
const static = require('koa-static')

require('./app/models/user')

const app = new Koa();
app.use(catchError)
app.use(parser())
//path.jion(__dirname),'./static'
app.use(static(path.join(__dirname,'./static')))

InitMangaer.initCore(app)


app.listen(3000)